#include "Server.hpp"
#include "Buffer.hpp"
#include "Channel.hpp"
#include "Poller.hpp"
int main()
{
    Buffer buf;
    for(int i = 0; i < 300; ++i)
    {
        std::string str = "hello!!" + std::to_string(i) + '\n';
        buf.WriteStringAndPush(str);
    }
    while(buf.ReadAbleSize() > 0)
    {
        std::string line = buf.GetLineAndPop();
        DEBUG_LOG("hello");
    }
    // buf.WriteStringAndPush(str);
    // Buffer buf1;
    // buf1.WriteBufferAndPush(buf);
    // std::string tmp = buf1.ReadAsStringAndPop(buf1.ReadAbleSize());
    // std::cout << tmp << std::endl;  
    // std::cout << buf.ReadAbleSize() << std::endl; 
    // std::cout << buf1.ReadAbleSize() << std::endl; 

    return 0;
}